package com.sinosoft.dsp.persistence.businessconcept.facade;

import com.sinosoft.dsp.persistence.exception.SinoPersistenceException;

/**
 * 实体代理的CRUD接口
 * 
 * @author 潘巍（Peter Pan）
 * @since 2011-4-23 下午09:18:07
 */
public interface ICRUDEntity {

	/**
	 * 通过ID进行初始化
	 * 
	 * @param id
	 * @exception SinoPersistenceException
	 */
	public void instantiate(String id) throws SinoPersistenceException;

	/**
	 * 创建
	 * 
	 * @param emName
	 * @exception SinoPersistenceException
	 * 
	 * @return 新创建实体的ID
	 */
	public String create() throws SinoPersistenceException;

	/**
	 * 更新
	 * 
	 * @param emName
	 * @exception SinoPersistenceException
	 * 
	 * @return 是否更新成功
	 */
	public boolean merge() throws SinoPersistenceException;

	/**
	 * 移除
	 * 
	 * @param emName
	 * @exception SinoPersistenceException
	 * 
	 * @return 是否移除成功
	 */
	public boolean remove() throws SinoPersistenceException;

}
